package com.ruoyi.ebike.service.impl;

import java.util.List;

import com.ruoyi.ebike.vo.FlowIncomeVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ebike.mapper.FlowRecordsMapper;
import com.ruoyi.ebike.domain.FlowRecords;
import com.ruoyi.ebike.service.IFlowRecordsService;

/**
 * 流水记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-07
 */
@Service
public class FlowRecordsServiceImpl implements IFlowRecordsService 
{
    @Autowired
    private FlowRecordsMapper flowRecordsMapper;

    /**
     * 查询流水记录
     * 
     * @param id 流水记录主键
     * @return 流水记录
     */
    @Override
    public FlowRecords selectFlowRecordsById(Long id)
    {
        return flowRecordsMapper.selectFlowRecordsById(id);
    }

    /**
     * 查询流水记录列表
     * 
     * @param flowRecords 流水记录
     * @return 流水记录
     */
    @Override
    public List<FlowRecords> selectFlowRecordsList(FlowRecords flowRecords)
    {
        return flowRecordsMapper.selectFlowRecordsList(flowRecords);
    }

    /**
     * 新增流水记录
     * 
     * @param flowRecords 流水记录
     * @return 结果
     */
    @Override
    public int insertFlowRecords(FlowRecords flowRecords)
    {
        return flowRecordsMapper.insertFlowRecords(flowRecords);
    }

    /**
     * 修改流水记录
     * 
     * @param flowRecords 流水记录
     * @return 结果
     */
    @Override
    public int updateFlowRecords(FlowRecords flowRecords)
    {
        return flowRecordsMapper.updateFlowRecords(flowRecords);
    }

    /**
     * 批量删除流水记录
     * 
     * @param ids 需要删除的流水记录主键
     * @return 结果
     */
    @Override
    public int deleteFlowRecordsByIds(Long[] ids)
    {
        return flowRecordsMapper.deleteFlowRecordsByIds(ids);
    }

    /**
     * 删除流水记录信息
     * 
     * @param id 流水记录主键
     * @return 结果
     */
    @Override
    public int deleteFlowRecordsById(Long id)
    {
        return flowRecordsMapper.deleteFlowRecordsById(id);
    }

    /**
     * 获取流水收入
     * @return
     */
    @Override
    public List<FlowIncomeVO> getIncome(FlowRecords flowRecords) {
        return flowRecordsMapper.getIncome(flowRecords);
    }
}
